<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        /* 
             Object.is(value1, value2)
                 用来比较两个值是否严格相等，与（===）基本类似。
        */
        console.log(Object.is("123", 123));
        console.log(Object.is("123", "123"));
        console.log(Object.is([1], [1]));

        // 与（===）的区别
        //一是+0不等于-0
        Object.is(+0, -0);  //false
        +0 === -0  //true
        //二是NaN等于本身
        Object.is(NaN, NaN); //true
        NaN === NaN  //false
    </script>
</body>

</html>